import request from '@/utils/request'

// 查询学生列表
export function listStudent(query) {
  return request({
    url: '/student/student/getList',
    method: 'get',
    params: query
  })
}

// 查询学生详细
export function getStudent(id) {
  return request({
    url: '/student/student/' + id,
    method: 'get'
  })
}

// 新增学生
export function addStudent(data) {
  return request({
    url: '/student/student',
    method: 'post',
    data: data
  })
}

// 修改学生
export function updateStudent(data) {
  return request({
    url: '/student/student',
    method: 'put',
    data: data
  })
}

// 删除学生
export function delStudent(id) {
  return request({
    url: '/student/student/' + id,
    method: 'delete'
  })
}

//下拉框查询班级
export function getClass() {
  return request({
    url: '/student/student/classes',
    method: 'get'
  })
}

// 留学转班
export function changeClass(data) {
  return request({
    url: '/student/student/changeClass',
    method: 'post',
    data: data
  })
}

// 留学转班
export function followStudent(data) {
  return request({
    url: '/student/student/followStudent',
    method: 'post',
    data: data
  })
}
